package com.xcy.controller;

import com.xcy.mapper.TestMapper;
import com.xcy.po.TestExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by xcy on 2018/8/22.
 */
@Controller
@RequestMapping("/test")
@ResponseBody
public class TestController {

    @Autowired
    TestMapper testMapper;
    //映射一个action
    @RequestMapping("/index")
    @ResponseBody
    public Object index() {
        //输出日志文件
        TestExample example=new TestExample();
        example.createCriteria();
        return testMapper.selectByExample(example);
    }
}